package com.xucan.extendsMap;

import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Data
public class Entity extends HashMap<String, Object> {
    private String code;

    public static void main(String[] args) {
        List<Integer> lists  = new ArrayList<>();
        lists.add(2);
        lists.add(1);
        lists.add(3);
        lists.add(4);
        lists.add(5);
        List listsx=lists.stream().map(x -> {
            if (x.equals(2)){
              return   Stream.empty();
            }
            return x;
        }).collect(Collectors.toList());
        System.out.println(listsx);

//        System.out.println(lists.toArray().toString().replace("[", "").replace("]", ""));
//        System.out.println(lists.toString().replace("[", "").replace("]", ""));



    }
}